package OOday02;

/**
 * @description: TODO
 * @author yumo
 * @version: 1.0
 * @date 2025/3/6 15:54
 */
public class Teacher extends Person {
    double salary;
    Teacher(){

    }
    Teacher(double salary,String name,int age,String address){
        super(name,age,address);
        this.salary=salary;
    }
    void teach(){
        System.out.println(name+"正在讲课");
    }
    void sayHi() {
        System.out.println("大家好，我是" + name + "今年" + age + "岁了，家住" + address+"工资"+salary);
    }
    public static void main(String[] args) {
        Teacher aa=new Teacher(5000,"lilei",18,"唐山");
        aa.teach();
        aa.sayHi();

    }
}
